﻿#region License
// (c) Garry McGlennon 2009
// 
// UnitTestEx is made available under the Microsoft Public License (Ms-PL)
// Code is provided as is and with no warrenty – Use at your own risk
// View the project and the latest code at http://codeplex.com/UnitTestEx/
// 
// All other rights reserved.
// 
// blog: www.dotNetProfessional.com/blog/
#endregion
namespace dnp.UnitTestEx.TestDoubles
{
    /// <summary>
    /// Used to handle service methods that return data. This allows the Fake to have access to data passed in by a unit test. See also the VoidServiceMethodSpy for further details.
    /// </summary>
    /// <typeparam name="T">the type of the data returned by the service method</typeparam>
    public class DataServiceMethodSpy<T> : VoidServiceMethodSpy
    {
        public T SimulatedData { get; set; }

        public T MethodResult()
        {
            // While this looks like overkill, its here to allow future expansion
            return this.SimulatedData;
        }
    }
}
